home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / fax / src / faxd / class2.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  5KB  |  120 lines

  1. /*    $Header: /usr/people/sam/fax/faxd/RCS/class2.h,v 1.14 1994/02/28 14:14:42 sam Rel $ */
  2. /*
  3.  * Copyright (c) 1990, 1991, 1992, 1993, 1994 Sam Leffler
  4.  * Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and 
  7.  * its documentation for any purpose is hereby granted without fee, provided
  8.  * that (i) the above copyright notices and this permission notice appear in
  9.  * all copies of the software and related documentation, and (ii) the names of
  10.  * Sam Leffler and Silicon Graphics may not be used in any advertising or
  11.  * publicity relating to the software without the specific, prior written
  12.  * permission of Sam Leffler and Silicon Graphics.
  13.  * 
  14.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  15.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  16.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  17.  * 
  18.  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  19.  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  20.  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21.  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  22.  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  23.  * OF THIS SOFTWARE.
  24.  */
  25. #ifndef _class2_
  26. #define    _class2_
  27. /*
  28.  * Class 2 Fax Modem Definitions.
  29.  */
  30. #define    BIT(i)    (1<<(i))
  31.  
  32. // bit ordering directives +fbor=<n>
  33. const int BOR_C_DIR    = 0;        // phase C direct
  34. const int BOR_C_REV    = 1;        // phase C reversed
  35. const int BOR_C        = 0x1;
  36. const int BOR_BD_DIR    = (0<<1);    // phase B/D direct
  37. const int BOR_BD_REV    = (1<<1);    // phase B/D reversed
  38. const int BOR_BD    = 0x2;
  39.  
  40. // service types returned by +fclass=?
  41. const int SERVICE_DATA     = BIT(0);    // data service
  42. const int SERVICE_CLASS1 = BIT(1);    // class 1 interface
  43. const int SERVICE_CLASS2 = BIT(2);    // class 2 interface
  44. const int SERVICE_CLASS20 = BIT(3);    // class 2.0 interface
  45. const int SERVICE_VOICE     = BIT(8);    // voice service (ZyXEL extension)
  46. const int SERVICE_ALL     = BIT(9)-1;
  47.  
  48. // t.30 session subparameter codes
  49. const int VR_NORMAL    = 0;        // 98 lpi
  50. const int VR_FINE    = 1;        // 196 lpi
  51. const int VR_ALL    = BIT(VR_FINE+1)-1;
  52.  
  53. const int BR_2400    = 0;        // 2400 bit/s
  54. const int BR_4800    = 1;        // 4800 bit/s
  55. const int BR_7200    = 2;        // 7200 bit/s
  56. const int BR_9600    = 3;        // 9600 bit/s
  57. const int BR_12000    = 4;        // 12000 bit/s
  58. const int BR_14400    = 5;        // 14400 bit/s
  59. const int BR_ALL    = BIT(BR_14400+1)-1;
  60.  
  61. const int WD_1728    = 0;        // 1728 pixels in 215 mm
  62. const int WD_2048    = 1;        // 2048 pixels in 255 mm
  63. const int WD_2432    = 2;        // 2432 pixels in 303 mm
  64. const int WD_1216    = 3;        // 1216 pixels in 151 mm
  65. const int WD_864    = 4;        // 864 pixels in 107 mm
  66. const int WD_ALL    = BIT(WD_864+1)-1;
  67.  
  68. const int LN_A4        = 0;        // A4, 297 mm
  69. const int LN_B4        = 1;        // B4, 364 mm
  70. const int LN_INF    = 2;        // Unlimited length
  71. const int LN_ALL    = BIT(LN_INF+1)-1;
  72.  
  73. const int DF_1DMR    = 0;        // 1-D Modified Huffman
  74. const int DF_2DMR    = 1;        // 2-D Modified Huffman
  75. const int DF_2DMRUNCOMP    = 2;        // 2-D Uncompressed Mode
  76. const int DF_2DMMR    = 3;        // 2-D Modified Modified Read
  77. const int DF_ALL    = BIT(DF_2DMMR+1)-1;
  78.  
  79. const int EC_DISABLE    = 0;        // disable ECM
  80. const int EC_ENABLE    = 1;        // enable ECM
  81. const int EC_ALL    = 0x3;
  82.  
  83. const int BF_DISABLE    = 0;        // disable BFT
  84. const int BF_ENABLE    = 1;        // enable BFT
  85. const int BF_ALL    = 0x3;
  86.  
  87. const int ST_0MS    = 0;        // scan time/line: 0 ms/0 ms
  88. const int ST_5MS    = 1;        // scan time/line: 5 ms/5 ms
  89. const int ST_10MS2    = 2;        // scan time/line: 10 ms/5 ms
  90. const int ST_10MS    = 3;        // scan time/line: 10 ms/10 ms
  91. const int ST_20MS2    = 4;        // scan time/line: 20 ms/10 ms
  92. const int ST_20MS    = 5;        // scan time/line: 20 ms/20 ms
  93. const int ST_40MS2    = 6;        // scan time/line: 40 ms/20 ms
  94. const int ST_40MS    = 7;        // scan time/line: 40 ms/40 ms
  95. const int ST_ALL    = BIT(ST_40MS+1)-1;
  96.  
  97. // post page message codes
  98. const int PPM_MPS    = 0;        // another page next, same document
  99. const int PPM_EOM    = 1;        // another document next
  100. const int PPM_EOP    = 2;        // no more pages or documents
  101. const int PPM_PRI_MPS    = 4;        // another page, procedure interrupt
  102. const int PPM_PRI_EOM    = 5;        // another doc, procedure interrupt
  103. const int PPM_PRI_EOP    = 6;        // all done, procedure interrupt
  104.  
  105. // post page response codes
  106. const int PPR_MCF    = 1;        // page good
  107. const int PPR_RTN    = 2;        // page bad, retrain requested
  108. const int PPR_RTP    = 3;        // page good, retrain requested
  109. const int PPR_PIN    = 4;        // page bad, interrupt requested
  110. const int PPR_PIP    = 5;        // page good, interrupt requested
  111.  
  112. // important stream transfer codes
  113. const int DLE = 16;        // transparent character escape
  114. const int SUB = 26;        // <DLE><SUB> => <DLE><DLE> for Class 2.0
  115. const int ETX = 3;        // <DLE><ETX> means end of transfer
  116. const int DC1 = 17;        // start data transfer (Class 2)
  117. const int DC2 = 18;        // start data transfer (Class 2.0 and ZyXEL)
  118. const int CAN = 24;        // abort data transfer
  119. #endif /* _class2_ */
  120.